package com.heqiang.spring.service;

import java.util.HashMap;
import java.util.Map;

public class TestDao {

    private static Map<String,String> map = new HashMap<>(10);

    public void initDataMethod() {
        System.out.println("执行init-method");
        map.put("1001","a");
        map.put("1002","b");
        map.put("1003","c");
        map.put("1004","d");
    }

    public void destroyDataMethod() {
        System.out.println("执行：destroy-method");
        map.clear();
    }

    public String queryName(String uId) {
        return map.get(uId);
    }
}
